# SQL 获取所有商品累计收入并按收入排序
sql_goods_stat_order="select goods_name, sum(money) as goodsMoney from goods group by goods_name order by goodsMoney"

#SQL 获取所有商品累计收入
sql_goods_stat = "select goods_name, sum(money) as goodsMoney from goods group by goods_name"

#SQL:获得当前最新记录所在日期
sql_newDate='select date from goods limit 1'

#SQL: for3D show
sql_3d="select date, goods_name, sum(money) as dailyGoodsMoney from goods where date between '{}' and '{}'  \
                                 group by date,goods_name"

#SQL:获取每日各商品销售收入
sql_daily_income = "select date, goods_name, sum(money) as dailyGoodsMoney from goods where date='{}' group by date,goods_name"

#SQL:获取每日收入总和
sql_daily_money_sum = "select date, sum(money) as dailyMoney from goods  where date between '{}' and '{}' group by date"


# market_c = MarketModel().DailyMoneyQuery(startDate=None,endDate=None)
# market_c = MarketModel().DailyGoodsMarketQuery(endDate=None)
# sql_daily_morning_goods_stat = "select date, sum(money) from goods " \
#                                "where time <'12' " \
#                                "group by date "
# sql_daily_afternoon_goods_stat = "select date, sum(money) from goods " \
#                                      "where time between '12' and '18' " \
#                                      "group by date "
# sql_daily_evening_goods_stat = "select date, sum(money) from goods " \
#                                    "where time > '18' " \
#                                    "group by date "